class Person {
    name!: string
    age!: number
    eating () {
        console.log(`${ this.name }在eating`)
    }
    constructor (name: string, age: number) {
        this.name = name 
        this.age = age
    }
}

class Student extends Person {
    sno!: number
    constructor (name: string, age: number, sno: number) {
        super(name, age)
        this.sno = sno
    }
    studying () {
        console.log('studying')
    }

}
class Teacher extends Person {
    techer: string
    constructor(name: string, age: number, techer: string) {
        super(name, age)
        this.techer = techer
    }
    teacher () {
        console.log('teacher')
    }
}
const stu = new Student('why', 30, 10)
console.log('stu.name==', stu.name)
console.log('stu.age====', stu.age)
stu.studying()
stu.eating()
const teach = new Teacher('haha', 30, '10')
console.log('teacher===', teach)
export {}
// let num: number = 8888
// console.log(num)